package com.neutech.servlet;

import com.sun.net.httpserver.HttpServer;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class HelloServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          resp.setContentType("application/json;charset=utf-8");
//          PrintWriter out = resp.getWriter();
//          out.println("<a href=\"https://www.baidu.com\">百度一下</a>");
//          out.close();
//          String json ="{\"id\":1,\"name\":\"zhangsan\",\"age\":18}";
  }
}
